Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove new tab default on image credits #2880

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

gamebits
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Image credits with links currently default to opening in a new tab. In general, opening in a new tab is not a great user experience, as it deprives the user of the freedom of whether to open it in the current tab or a new one.

There are also accessibility considerations, as opening in a new tab makes the site problematic for users with disabilities who use assistive technologies.

This handy guide explains why it’s not a great idea and details some narrow cases where it might be preferable:

https://css-tricks.com/use-target_blank/

The thinking on this has evolved fairly recently, but current best practices are to open most, if not all, links in the same tab (with possible exceptions for when it opens a document like a PDF or something else that takes you out of your regular browser experience). There's more about the approach in this article from DMXzone:

https://www.dmxzone.com/go/10742/free-beware-of-opening-links-in-a-new-window/

WordPress 6.3 and later have downplayed the prevalence of new tab behavior, as seen in WordPress/gutenberg#50950

Publishers who prefer that credits open in a new tab are welcome to install a separate plugin that enforces this behavior, as opposed to it being decided by the theme.

How to test the changes in this Pull Request:

  1. Upload an image and provide credit metadata, including a source URL.
  2. Set the uploaded image as a featured image (such as position: "Behind") on a post.
  3. View the post. Observe that the image credit link opens in a new tab.
  4. Switch to this branch.
  5. Observe that the image credit link now opens in the same tab.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Image credits default to opening in a new tab. In general, opening in a new tab is actually not a great user experience, as it deprives the user of the freedom of whether to open it in the current tab or a new one.

There are also accessibility considerations, as opening in a new tab makes the site problematic for users with disabilities who use assistive technologies.

This handy guide explains why it’s not a great idea and details some narrow cases where it might be preferable:

https://css-tricks.com/use-target_blank/

The thinking on this has evolved fairly recently, but current best practices are to open most, if not all, links in the same tab (with possible exceptions for when it opens a document like a PDF or something else that takes you out of your regular browser experience). There's more about the approach in this article from DMXzone:

https://www.dmxzone.com/go/10742/free-beware-of-opening-links-in-a-new-window/

Publishers who insist on making this the default are welcome to install a separate plugin that enforces this behavior, as opposed to it being decided by the theme.
Image credits default to opening in a new tab. In general, opening in a new tab is actually not a great user experience, as it deprives the user of the freedom of whether to open it in the current tab or a new one.

There are also accessibility considerations, as opening in a new tab makes the site problematic for users with disabilities who use assistive technologies.

This handy guide explains why it’s not a great idea and details some narrow cases where it might be preferable:

https://css-tricks.com/use-target_blank/

The thinking on this has evolved fairly recently, but current best practices are to open most, if not all, links in the same tab (with possible exceptions for when it opens a document like a PDF or something else that takes you out of your regular browser experience). There's more about the approach in this article from DMXzone:

https://www.dmxzone.com/go/10742/free-beware-of-opening-links-in-a-new-window/

Publishers who insist on making this the default are welcome to install a separate plugin that enforces this behavior, as opposed to it being decided by the theme.
@gamebits gamebits requested a review from a team as a code owner January 25, 2024 02:57
@laurelfulford laurelfulford added the [Status] Needs Review The issue or pull request needs to be reviewed label Jan 26, 2024
@dkoo dkoo changed the base branch from master to trunk February 2, 2024 01:02
@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Feb 6, 2024
@adekbadek adekbadek merged commit 3c996b1 into trunk Feb 8, 2024
7 checks passed
@adekbadek adekbadek deleted the feat/image-credit-no-new-tab branch February 8, 2024 08:15
matticbot pushed a commit that referenced this pull request Feb 8, 2024
# [3.1.0-alpha.1](v3.0.3...v3.1.0-alpha.1) (2024-02-08)

### Bug Fixes

* **engagement-wizard:** handle error when retrieving subscription lists ([e85c108](e85c108))
* **ras:** only sync spend total and last payment amounts for completed orders ([#2886](#2886)) ([68aaf39](68aaf39))
* redirect to origin from magic link ([9f41947](9f41947))
* typescript errors ([dc27973](dc27973))
* TypeScript usage; add to CI ([#2884](#2884)) ([6f5e7a6](6f5e7a6))
* update newsletter scroll appearance in Sign Up modal ([#2897](#2897)) ([496723a](496723a))

### Features

* **ci:** add epic/* release workflow and rename `master` to `trunk` ([#2895](#2895)) ([ea02075](ea02075)), closes [#2897](#2897) [#2886](#2886)
* **reader-revenue:** make NYP and Stripe Gateway optional ([#2866](#2866)) ([fcfa88c](fcfa88c))
* remove new tab default on image credits ([#2880](#2880)) ([3c996b1](3c996b1))
* **wc:** override cart, checkout, and my-account page templates ([#2893](#2893)) ([68b1836](68b1836))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.0-epic-ras-acc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Feb 20, 2024
# [3.1.0](v3.0.5...v3.1.0) (2024-02-20)

### Bug Fixes

* add frequency tab options for donations, even when tiers are disabled ([#2930](#2930)) ([cb7eb7b](cb7eb7b))
* **categories:** fix pager urls ([#2913](#2913)) ([bb7e534](bb7e534))
* **categories:** fix pager urls ([#2913](#2913)) ([c851bb6](c851bb6))
* **engagement-wizard:** handle error when retrieving subscription lists ([e85c108](e85c108))
* **ras:** only sync spend total and last payment amounts for completed orders ([#2886](#2886)) ([68aaf39](68aaf39))
* redirect to origin from magic link ([9f41947](9f41947))
* typescript errors ([dc27973](dc27973))
* TypeScript usage; add to CI ([#2884](#2884)) ([6f5e7a6](6f5e7a6))
* update newsletter scroll appearance in Sign Up modal ([#2897](#2897)) ([496723a](496723a))
* update path to wide template file ([#2918](#2918)) ([fdd6b69](fdd6b69))

### Features

* **ci:** add epic/* release workflow and rename `master` to `trunk` ([#2895](#2895)) ([ea02075](ea02075)), closes [#2897](#2897) [#2886](#2886)
* **reader-revenue:** make NYP and Stripe Gateway optional ([#2866](#2866)) ([fcfa88c](fcfa88c))
* remove new tab default on image credits ([#2880](#2880)) ([3c996b1](3c996b1))
* **wc:** override cart, checkout, and my-account page templates ([#2893](#2893)) ([68b1836](68b1836))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @alpha released on @epic/ras-acc released [Status] Approved The pull request has been reviewed and is ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants